package com.gang.mars.basic.thread;

/**
 * 线程第3课：创建线程，继承实现Runnable接口
 * */
public class Grape003 {

    static class Grape004 implements Runnable{
        @Override
        public void run() {

            System.out.println(Thread.currentThread().getName());
        }
    }

    public static void main(String[] args) {

        Grape004 t4 = new Grape004();

        Thread thread = new Thread(t4, "grape-004");

        thread.start();

        for (int i = 0; i < 10; i++) {
            System.out.println(Thread.currentThread().getName()+"-"+i);
        }
    }
}
